# REPLICATION ARCHIVE

This replication archive contains all scripts and data necessary to replicate the analysis in "Earning Their Stripes? How Political Experience Shapes Gendered Policy Prioritisation".

## SCRIPTS

In order to re-run the models described in the paper, you will need to execute the following files (in this order):

- 01_prep_fcm.R

	- Constructs the feature-cooccurance matrix required for estimating word embeddings

- 02_estimate_embeddings.R

	- Estimates word embeddings from the parliamentary corpus

- 03_prep_dictionaries.R

	- Constructs word-scores for each word in the corpus using the estimated embeddings and a set of seed dictionaries

- 04a_apply_dictionaries.R

	- Scores each speech in the corpus using the word-scores 

- 04b_apply_liwc_dictionaries.R

	- Scores each speech in the corpus with the LIWC dictionaries

- 04c_apply_debate_dictionaries.R

	- Scores each debate in the corpus using seed word dictionaries 

- 04d_apply_liwc_debate_dictionaries.R

	- Scores each debate in the corpus using the LIWC dictionaries

- 05_prep_debates_meta.R

	- Adds a series of meta data variables to the issue scores for each speech

- 06_scores_merge.R

	- Merges together all speech- and debate-level scores and speech-level meta data

- 07a_analysis.R

	- Estimates all models and produces all outputs of figures in the main paper 

- 07b_analysis_supplementary.R

	- Estimates all models and produces all outputs of supplementary materials analysis 

- 07c_age_analysis.R

	- Estimates all models and produces all outputs for age robustness check

- 08_topic_model_estimation_analysis.R

	- Estimates a series of topic models for the corpus and creates outputs for the topic model analysis

- 99_miscellaneous.R

	- Carries out various validation checks 

## DATA

- debates.Rdata # Raw debate texts and associated meta data from https://reshare.ukdataservice.ac.uk/854292/
- dictionaries/
	- liwc.Rdata # LIWC dictionaries
	- parliamentary_jargon.csv # Dictionary of parliamentary jargon
	- seed_words.csv # Bespoke seed dictionary for all issue areas
- mp_data/
	- final_occupation_education_v2.csv # Data on MP occupation and education levels


## SOFTWARE

- R # v4.3.1
- RStudio # v2023.06.2+561
- quanteda # v3.3.1
- quanteda.dictionaries # [github::kbenoit/quanteda.dictionaries] v0.22
- text2vec # v0.6.3
- tidyverse # v2.0.0
- data.table # v1.14.8
- plyr # v1.8.9
- ggplot2 # v3.4.3
- corrplot # v0.92
- broom # v1.0.5
- broom.helpers # v1.14.0
- estimatr # v1.0.0
- sandwich # v3.0-2
- clubSandwich # v0.5.10
- stargazer # v5.2.3
- stm # v1.3.6.1
- tidytext # v0.4.1
- tidyr # v1.3.0
- dplyr # v1.1.3
- plm # v2.6-3
- sjPlot  # v2.8.15
- sjmisc # v2.8.9